/*
* qiudot.com Inc.
* Copyright (c) 2019 All Rights Reserved.
* create by qiudot
* date:2019-09-21
*/
package com.lora.entity;


import com.acooly.core.common.domain.AbstractEntity;
import com.lora.common.ColumnParse;
import lombok.Getter;
import lombok.Setter;

import javax.persistence.Entity;
import javax.persistence.Table;
import javax.validation.constraints.Size;
import java.math.BigDecimal;

/**
 * UPS Entity
 *
 * @author qiudot
 * Date: 2019-09-21 19:45:55
 */
@Entity
@Table(name = "lora_ups")
@Getter
@Setter
public class Ups extends AbstractEntity {

    /**
     * 设备编号
     */
	@Size(max = 64)
    private String equipmentid;

    /**
     * 原始数据
     */
    @Size(max = 5124)
	private String datastring;

    /**
     * 交流旁路电压A
     */
    @ColumnParse(seq = 1, ratio = 0.1)
    private BigDecimal acVoltagea;

    /**
     * 交流旁路电压B
     */
    @ColumnParse(seq = 2, ratio = 0.1)
    private BigDecimal acVoltageb;

    /**
     * 交流旁路电压C
     */
    @ColumnParse(seq = 3, ratio = 0.1)
    private BigDecimal acVoltagec;

    /**
     * 交流旁路电流A
     */
    @ColumnParse(seq = 4, ratio = 0.1)
    private BigDecimal acCurrenta;

    /**
     * 交流旁路电流B
     */
    @ColumnParse(seq = 5, ratio = 0.1)
    private BigDecimal acCurrentb;

    /**
     * 交流旁路电流C
     */
    @ColumnParse(seq = 6, ratio = 0.1)
    private BigDecimal acCurrentc;

    /**
     * 交流旁路频率A
     */
    @ColumnParse(seq = 7, ratio = 0.01)
    private BigDecimal acRatea;

    /**
     * 交流旁路频率B
     */
    @ColumnParse(seq = 8, ratio = 0.01)
    private BigDecimal acRateb;

    /**
     * 交流旁路频率C
     */
    @ColumnParse(seq = 9, ratio = 0.01)
    private BigDecimal acRatec;

    /**
     * 交流旁路PF_A
     */
    @ColumnParse(seq = 10, ratio = 0.01)
    private BigDecimal acPfa;

    /**
     * 交流旁路PF_B
     */
    @ColumnParse(seq = 11, ratio = 0.01)
    private BigDecimal acPfb;

    /**
     * 交流旁路PF_C
     */
    @ColumnParse(seq = 12, ratio = 0.01)
    private BigDecimal acPfc;

    /**
     * 交流输入电压A
     */
    @ColumnParse(seq = 13, ratio = 0.1)
    private BigDecimal acInVoltagea;

    /**
     * 交流输入电压B
     */
    @ColumnParse(seq = 14, ratio = 0.1)
    private BigDecimal acInVoltageb;

    /**
     * 交流输入电压C
     */
    @ColumnParse(seq = 15, ratio = 0.1)
    private BigDecimal acInVoltagec;

    /**
     * 交流输入电流A
     */
    @ColumnParse(seq = 16, ratio = 0.1)
    private BigDecimal acInCurrenta;

    /**
     * 交流输入电流B
     */
    @ColumnParse(seq = 17, ratio = 0.1)
    private BigDecimal acInCurrentb;

    /**
     * 交流输入电流C
     */
    @ColumnParse(seq = 18, ratio = 0.1)
    private BigDecimal acInCurrentc;

    /**
     * 交流输入频率A
     */
    @ColumnParse(seq = 19, ratio = 0.01)
    private BigDecimal acInRatea;

    /**
     * 交流输入频率B
     */
    @ColumnParse(seq = 20, ratio = 0.01)
    private BigDecimal acInRateb;

    /**
     * 交流输入频率C
     */
    @ColumnParse(seq = 21, ratio = 0.01)
    private BigDecimal acInRatec;

    /**
     * 交流输入PF_A
     */
    @ColumnParse(seq = 22, ratio = 0.01)
    private BigDecimal acInPha;

    /**
     * 交流输入PF_B
     */
    @ColumnParse(seq = 23, ratio = 0.01)
    private BigDecimal acInPhb;

    /**
     * 交流输入PF_C
     */
    @ColumnParse(seq = 24, ratio = 0.01)
    private BigDecimal acInPhc;

    /**
     * 交流输出电压A
     */
    @ColumnParse(seq = 25, ratio = 0.1)
    private BigDecimal acOutVoltagea;

    /**
     * 交流输出电压B
     */
    @ColumnParse(seq = 26, ratio = 0.1)
    private BigDecimal acOutVoltageb;

    /**
     * 交流输出电压C市电输入电压
     */
    @ColumnParse(seq = 27, ratio = 0.1)
    private BigDecimal acOutVoltagec;

    /**
     * 交流输出电流A
     */
    @ColumnParse(seq = 28, ratio = 0.1)
    private BigDecimal acOutCurrenta;

    /**
     * 交流输出电流B
     */
    @ColumnParse(seq = 29, ratio = 0.1)
    private BigDecimal acOutCurrentb;

    /**
     * 交流输出电流C
     */
    @ColumnParse(seq = 30, ratio = 0.1)
    private BigDecimal acOutCurrentc;

    /**
     * 交流输出频率A
     */
    @ColumnParse(seq = 31, ratio = 0.01)
    private BigDecimal acOutRatea;

    /**
     * 交流输出频率B
     */
    @ColumnParse(seq = 32, ratio = 0.01)
    private BigDecimal acOutRateb;

    /**
     * 交流输出频率C
     */
    @ColumnParse(seq = 33, ratio = 0.01)
    private BigDecimal acOutRatec;

    /**
     * 交流输出PH_A
     */
    @ColumnParse(seq = 34, ratio = 0.1)
    private BigDecimal acOutPha;

    /**
     * 交流输出PH_B
     */
    @ColumnParse(seq = 35, ratio = 0.1)
    private BigDecimal acOutPhb;

    /**
     * 交流输出PH_C
     */
    @ColumnParse(seq = 36, ratio = 0.1)
    private BigDecimal acOutPhc;

    /**
     * 输出视在功率A
     */
    @ColumnParse(seq = 37, ratio = 0.1)
    private BigDecimal outLookPowera;

    /**
     * 输出视在功率B
     */
    @ColumnParse(seq = 38, ratio = 0.1)
    private BigDecimal outLookPowerb;

    /**
     * 输出视在功率C
     */
    @ColumnParse(seq = 39, ratio = 0.1)
    private BigDecimal outLookPowerc;

    /**
     * 输出有功功率A
     */
    @ColumnParse(seq = 40, ratio = 0.1)
    private BigDecimal outEffectivePowera;

    /**
     * 输出有功功率B
     */
    @ColumnParse(seq = 41, ratio = 0.1)
    private BigDecimal outEffectivePowerb;

    /**
     * 输出有功功率C
     */
    @ColumnParse(seq = 42, ratio = 0.1)
    private BigDecimal outEffectivePowerc;

    /**
     * 输出无功功率A
     */
    @ColumnParse(seq = 43, ratio = 0.1)
    private BigDecimal outInvalidPowera;

    /**
     * 输出无功功率B
     */
    @ColumnParse(seq = 44, ratio = 0.1)
    private BigDecimal outInvalidPowerb;

    /**
     * 输出无功功率C
     */
    @ColumnParse(seq = 45, ratio = 0.1)
    private BigDecimal outInvalidPowerc;

    /**
     * 负载百分数A
     */
    @ColumnParse(seq = 46, ratio = 10)
    private BigDecimal loadPercentagea;

    /**
     * 负载百分数B
     */
    @ColumnParse(seq = 47, ratio = 10)
    private BigDecimal loadPercentageb;

    /**
     * 负载百分数C
     */
    @ColumnParse(seq = 48, ratio = 10)
    private BigDecimal loadPercentagec;

    /**
     * 环境温度
     */
    @ColumnParse(seq = 49, ratio = 0.1)
    private BigDecimal envTemperature;

    /**
     * 正电池组电压
     */
    @ColumnParse(seq = 50, ratio = 0.1)
    private BigDecimal positiveBatteryVoltage;

    /**
     * 负电池组电压
     */
    @ColumnParse(seq = 51, ratio = 0.1)
    private BigDecimal negativeBatteryVoltage;

    /**
     * 正电池组电流
     */
    @ColumnParse(seq = 52, ratio = 0.1, type = ColumnParse.DataType.INT)
    private BigDecimal positiveBatteryCurrent;

    /**
     * 负电池组电流
     */
    @ColumnParse(seq = 53, ratio = 0.1, type = ColumnParse.DataType.INT)
    private BigDecimal negativeBatteryCurrent;

    /**
     * 电池温度
     */
    @ColumnParse(seq = 54, ratio = 0.1)
    private BigDecimal batteryTemperature;

    /**
     * 电池剩余时间
     */
    @ColumnParse(seq = 55, ratio = 0.1)
    private BigDecimal batteryRemainCapacity;

    /**
     * 电池容量
     */
    @ColumnParse(seq = 56, ratio = 0.1)
    private BigDecimal batteryCapacity;


    // 供电方式
    @ColumnParse(seq = 57)
    private BigDecimal field81;
    // 电池状态
    @ColumnParse(seq = 58)
    private BigDecimal field82;
    // 电池连接状态
    @ColumnParse(seq = 59)
    private BigDecimal field83;
    // 维修旁路空开状态
    @ColumnParse(seq = 60)
    private BigDecimal field84;
    // EPO
    @ColumnParse(seq = 61)
    private BigDecimal field85;
    // 逆变器启动容量不足
    @ColumnParse(seq = 62)
    private BigDecimal field86;
    // 发电机接入
    @ColumnParse(seq = 63)
    private BigDecimal field87;
    // 交流输入故障
    @ColumnParse(seq = 64)
    private BigDecimal field88;
    // 旁路相序故障
    @ColumnParse(seq = 65)
    private BigDecimal field89;
    // 旁路电压故障
    @ColumnParse(seq = 66)
    private BigDecimal field90;
    // 旁路故障
    @ColumnParse(seq = 67)
    private BigDecimal field91;
    // 旁路过载
    @ColumnParse(seq = 68)
    private BigDecimal field92;
    // 旁路过载超时
    @ColumnParse(seq = 69)
    private BigDecimal field93;
    // 旁路超跟踪
    @ColumnParse(seq = 70)
    private BigDecimal field94;
    // 切换次数到
    @ColumnParse(seq = 71)
    private BigDecimal field95;
    // 输出短路
    @ColumnParse(seq = 72)
    private BigDecimal field96;
    // 电池EOD
    @ColumnParse(seq = 73)
    private BigDecimal field97;
    // 电源测试开始(保留)
    @ColumnParse(seq = 74)
    private BigDecimal field98;
    // 电池自检状态
    @ColumnParse(seq = 75)
    private BigDecimal field99;
    // 电池手动自检开始(保留)
    @ColumnParse(seq = 76)
    private BigDecimal field100;
    // 电池维护状态
    @ColumnParse(seq = 77)
    private BigDecimal field101;
    // 停止测试(保留)
    @ColumnParse(seq = 78)
    private BigDecimal field102;
    // 故障清除(保留)
    @ColumnParse(seq = 79)
    private BigDecimal field103;
    // 历史清除(保留)
    @ColumnParse(seq = 80)
    private BigDecimal field104;
    // 禁止开机
    @ColumnParse(seq = 81)
    private BigDecimal field105;
    // 手动旁路
    @ColumnParse(seq = 82)
    private BigDecimal field106;
    // 电池低压
    @ColumnParse(seq = 83)
    private BigDecimal field107;
    // 电池接反
    @ColumnParse(seq = 84)
    private BigDecimal field108;
    // 整流器状态
    @ColumnParse(seq = 85)
    private BigDecimal field109;
    // 输入N线断开
    @ColumnParse(seq = 86)
    private BigDecimal field110;
    // 旁路风扇故障
    @ColumnParse(seq = 87)
    private BigDecimal field111;
    // 失去N+X冗余
    @ColumnParse(seq = 88)
    private BigDecimal field112;
    // EOD系统禁止
    @ColumnParse(seq = 89)
    private BigDecimal field113;

    private boolean alarmFlag = false;
}
